package FlashServer;


import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

public class DataMessage implements Externalizable
{
	private static final long serialVersionUID = 2043109179683446492L;
	
	public String Message;
    public int Index;
    public int Points; 
    public int DataType;
    
	public DataMessage() 
	{
		DataType = 0;
	}
	
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
    {
        Message = (String)in.readObject();
        Index = (int)in.readInt();
        Points = (int)in.readInt();
        DataType = (int)in.readInt();
    }	
    
    public void writeExternal(ObjectOutput out) throws IOException
    {       
        out.writeObject(Message);
        out.writeInt(Index);
        out.writeInt(Points);
        out.writeInt(DataType);
    }	

}
